home *** CD-ROM | disk | FTP | other *** search
- Subject: Bug in FW_CInterest?
- Sent: 6/25/96 9:08 AM
- Received: 6/25/96 9:18 AM
- From: Henri Lamiraux, lamiraux@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Came back with an error
-
-
- ------------------------------------------------------------------------
-
- The operator == definition of FW_CInterest in FWIntere.cpp, is giving me
- problems. Seems it always returns TRUE. Perhaps the return condition does
- not get fully evaluated due to precedence. Surrounding the return
- condition
- with parentheses may solve the problem.
-
-
- FW_Boolean FW_CInterest::operator==(const FW_CInterest& other) const
- {
- return fNotifier == other.fNotifier && fMessage == other.fMessage;
- }
-
-
- return (fNotifier == other.fNotifier && fMessage == other.fMessage);
-
- This operator is used as part of a MatchProc (FW_InterestMatchProc)
- testing
- whether a given FW_CInterst object is already in the Receiver's interest
- list.
-
- I don't seem to be able to add more than one interest to the list of a
- particular class object I'm writing. Any idea how I can get around the bug
- easily?
-
-
- I also noticed the following comment in FW_MNotifier::Notify()
- while (pair)
- {
- // Get the next pair before doing any action in case the object is
- destroyed
- // in the middle (for instance: OK button closing a dialog)
- // [LSD] Warning: still dangerous in case the notifier has more than
- 1 interest
-
- This appears to be true. Have you worked out a solution?
-
-
- Arni
-
-
-
- ........................................................................
- Henri Lamiraux lamiraux@apple.com
- Apple Computer, Inc. OpenDoc(tm) Development Framework
- ........................................................................
-
-